package com.example.usermanagement.liuka.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.usermanagement.exception.ObjectNotException;
import com.example.usermanagement.exception.ParamErrorException;
import com.example.usermanagement.liuka.model.FlowLog;
import com.example.usermanagement.vo.FlowReportVO;
import com.example.usermanagement.vo.FlowUserShopVO;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author yha
 * @ClassName
 * @description:TODO
 * @date 2024年09月10日
 * @version: 1.0.0
 */
public interface FlowLogService extends IService<FlowLog> {

    /**
     * @功能描述: 使用流量
     * @param
     * @param packageId
     * @param flowUserId
     * @param flowSize
     * @return
     * @author yanghao
     * @since 17:25 2024/9/10
    **/
    FlowLog addLog(Long packageId, Long flowUserId, BigDecimal flowSize,Long flowPackageUserId) throws ObjectNotException;

    void addFlow(Long flowUserId, BigDecimal flowSize) throws ObjectNotException, ParamErrorException;

    /**
     * 根据id查询用户购买详情
     * @param id
     * @return
     */
    FlowUserShopVO getDetail(Long id) throws ObjectNotException;

    List<FlowReportVO> reportList();
}
